<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Vue 测试实例 - 菜鸟教程(runoob.com)</title>
<script src="https://unpkg.com/vue/dist/vue.js"></script>
</head>
<body>
<div id="app">
  <span v-for="(one,index) in site"><input  type="checkbox" :checked="checked==index" @change="get(index)"><label>{{one.name}}</label></span>
  <span v-for="(item,index) in list"><input  type="checkbox" :checked="checkedMore.includes(index)" @change="getMore(index)"><label>{{item.name}}</label></span>
</div>
 
<script>
new Vue({
  el: '#app',
  data: {
    	message: 'Hello Vue.js!',
	  	site:[{name:'454'},{sex:'55'}],
	    list:[{name:'男'},{sex:'女'}],
	  	checked:0,
	  	checkedMore:[0]
  },
	methods:{
		get(index){
			this.checked = index;
			
		},
		getMore(index){
			this.checkedMore.push(index)
		}
	}
})
</script>
</body>
</html>